<!DOCTYPE html>
<html>
<head>
    <title></title>
    <#include "/header.html">
    <script src="${request.contextPath}/statics/libs/ajaxupload.js"></script>
    <link rel="stylesheet" href="${request.contextPath}/statics/css/bootstrap-table.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.css">
    <script src="${request.contextPath}/statics/libs/bootstrap-table.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.extension.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/tree.table.js"></script>
    <!--<script src="${request.contextPath}/statics/js/modules/course/ocupload.js"></script>-->
    <style>
        #treeDiv {
            overflow-y: auto;
            overflow-x: auto;
            height: 600px;

        }


    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div class="row">

        <div class="col-md-2" id="treeDiv">
            <!--<input type="text" class="form-control" v-model="searching" @keyup.enter="queryCourse" placeholder="课程名">-->
            <!--<button @click="queryCourse">查询</button>-->
            <ul id="courseTree" class="ztree"></ul>
        </div>

        <div class="col-md-10">
            <div v-show="showList">
                <div class="grid-btn">
                    <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                    <!--<a class="btn btn-primary" type="file" id="changeSmall" @click="changeCourseToSmall"><i class="fa fa-plus"></i>&nbsp;批量转微课</a>-->
                    <!--<input id="changeSmall" type="file" name="changeSmall" value="转微课"/>-->
                    <a class="btn btn-primary" id="changeSmall"><i class="fa fa-plus"></i>&nbsp;批量转微课</a>
                </div>
                <div style="margin-left: auto;margin-right: auto; margin-bottom: 10px;width: 300px;">
                    <b id="kcmc" style="margin-left: 100px; font-size: 25px;">课程名称</b>
                    <input type="text" id="CourseInput" class="form-control" style="cursor:pointer; text-align: center"
                           v-model="courseName" @click="courseTree" readonly="readonly" placeholder="所有课程"/>
                </div>
                <table id="courseTable" data-mobile-responsive="true" data-click-to-select="true">
                    <thead>
                    <tr>
                        <th data-field="selectItem" data-checkbox="true"></th>
                    </tr>
                    </thead>
                </table>
            </div>

            <div v-show="!showList" class="panel panel-default">
                <div class="panel-heading">{{title}}--{{courseName}}</div>
                <form class="form-horizontal">
                    <input type="hidden" class="form-control" v-model="courseBody.id" id="courseId"/>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">章节名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="courseBody.chapterName"
                                   placeholder="章节名称"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">章节设置</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" style="cursor:pointer;"
                                   v-model="courseBody.parentName" @click="courseTree2" readonly="readonly"
                                   placeholder="根目录"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2 control-label">类型</div>
                        <label class="radio-inline">
                            <input type="radio" name="courseBody.type" value="0" v-model="courseBody.type"/> 目录
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="courseBody.type" value="1" v-model="courseBody.type"/> 讲义
                        </label>
                    </div>


                    <div v-show="courseBody.type==1" class="form-group">
                        <div class="col-sm-2 control-label">封面地址</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="courseBody.coverPath" placeholder="封面地址"/>
                        </div>
                    </div>
                    <div v-show="courseBody.type==1" class="form-group">
                        <div class="col-sm-2 control-label">普清视频地址</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="courseBody.videoPath" placeholder="视频地址"/>
                        </div>
                    </div>

                    <div v-show="courseBody.type==1" class="form-group">
                        <div class="col-sm-2 control-label">高清视频地址</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="courseBody.videoHdPath"
                                   placeholder="视频地址"/>
                        </div>
                    </div>


                    <div v-show="courseBody.type==1" class="form-group">
                        <div class="col-sm-2 control-label">数据类型</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="courseBody.dataType" name="category" id="category">
                                <!--<option  value="html">html</option>-->
                                <option value=""></option>
                                <option value="pdf">pdf</option>
                                <!--<option value="ppt">ppt</option>-->
                            </select>
                        </div>
                    </div>


                    <div v-show="courseBody.type==1" class="form-group">
                        <div class="col-sm-2 control-label">资料地址</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="courseBody.dataPath" placeholder="资料地址"/>
                        </div>
                    </div>


                    <div v-show="courseBody.type==1" class="form-group">
                        <div class="col-sm-2 control-label">介绍</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="courseBody.introduce" placeholder="介绍"/>
                        </div>
                    </div>
                    <!--<div class="form-group">-->
                    <!--<div class="col-sm-2 control-label">课程Id</div>-->
                    <!--<div class="col-sm-10">-->
                    <!--<input type="text" class="form-control" v-model="courseBody.courseId" placeholder="课程Id"/>-->
                    <!--</div>-->
                    <!--</div>-->


                    <div class="form-group">
                        <div class="col-sm-2 control-label"></div>
                        <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                        &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 选择部门 -->
<div id="cLayer" style="display: none;padding:10px;">
    <ul id="courseTree2" class="ztree"></ul>
</div>

<script src="${request.contextPath}/statics/js/modules/course/coursebody.js?_${.now?long}"></script>
</body>
</html>